<?php
namespace app\common\model\project_model;

use app\common\helper\Obj2Array;
use app\common\model\Base;
use think\Model;

class ButtonModel extends Model {

    const STATUS_LOCK = 0;
    const STATUS_OK = 1;

    const TYPE_APPLET = 'TYPE_APPLET';//小程序跳转
    const TYPE_LINK = 'TYPE_LINK';//网页跳转
    const TYPE_LOCAL = 'TYPE_LOCAL';//本地网页跳转

    const GROUP_ARTICLE = 'group_article';
    const GROUP_BLESS = 'group_bless';
    const GROUP_ALBUM = 'group_album';
    const GROUP_TOP_BAR = 'group_top_bar';

    protected $table = 'ph_button';

    public static function statusList() {
        return [
            self::STATUS_OK => '启用',
            self::STATUS_LOCK => '锁定',
        ];
    }

    public static function typeList() {
        return [
            self::TYPE_APPLET => '小程序跳转',
            self::TYPE_LINK => '网页跳转',
            self::TYPE_LOCAL => '本地跳转',
        ];
    }

    public static function groupList() {
        return [
            self::GROUP_ALBUM => '相册组',
            self::GROUP_BLESS => '祝福组',
            self::GROUP_ARTICLE => '美文组',
            self::GROUP_TOP_BAR => '顶部导航组',
        ];
    }

}